"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from .views import typeviews,views,goodsviews

urlpatterns = [
    # 后台首页
    url(r'^$', views.index,name='myadminindex'),
    url(r'^login$', views.login,name="myadminlogin"),
    url(r'^dologin$', views.dologin,name="myadmindologin"),
    url(r'^verifycode$', views.verifycode,name="verifycode"),
    url(r'^logout$', views.logout,name="myadminlogout"),
    # 会员管理
    url(r'^useradd$', views.useradd,name='useradd'),
    url(r'^userinsert$', views.userinsert,name='userinsert'),   
    url(r'^userlist$', views.userlist,name='userlist'), 
    url(r'^userdel/(?P<uid>[0-9]+)$', views.userdel,name='userdel'),  
    url(r'^useredit/(?P<uid>[0-9]+)$', views.useredit,name='useredit'), 
    url(r'^userupdate$', views.userupdate,name='userupdate'),
	
    # 分类管理
    url(r'^typeadd$', typeviews.typeadd,name="typeadd"),
    url(r'^typeinsert$', typeviews.typeinsert,name="typeinsert"),
    url(r'^typelist$', typeviews.typelist,name="typelist"),
    url(r'^typeedit/(?P<uid>[0-9]+)$', typeviews.typeedit,name="typeedit"),
    url(r'^typedel/(?P<uid>[0-9]+)$', typeviews.typedel,name="typedel"),
    url(r'^typeupdate$', typeviews.typeupdate,name="typeupdate"),

    # 商品信息管理
    url(r'^goodsadd$', goodsviews.goodsadd,name="goodsadd"),
    url(r'^goodsinsert$', goodsviews.goodsinsert,name="goodsinsert"),
    url(r'^goodslist$', goodsviews.goodslist,name="goodslist"),
    url(r'^goodsdel/(?P<uid>[0-9]+)$', goodsviews.goodsdel,name="goodsdel"),
    url(r'^goodsedit/(?P<uid>[0-9]+)$', goodsviews.goodsedit,name="goodsedit"),
    url(r'^goodsupdate$', goodsviews.goodsupdate,name="goodsupdate"),

    # 订单管理
    url(r'^order/$', views.order,name="myadminorder"),
    url(r'^orderedit/(?P<uid>[0-9]+)$', views.orderedit,name="orderedit"),
    url(r'^orderxq/(?P<uid>[0-9]+)$', views.orderxq,name="orderxq"),
     url(r'^orderupdate',views.orderupdate ,name='orderupdate'),
]
